package com.city.service.pub.impl;

import com.city.domain.pub.PubCounty;
import com.city.repository.pub.PubCountyRepository;
import com.city.service.pub.PubCountyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @deprecation:
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-20 16:51
 */
@Service
public class PubCountyServiceImpl implements PubCountyService {
    @Autowired
    public PubCountyRepository countyRepository;

    @Override
    public List<PubCounty> findCode(String code) {
        return countyRepository.getAll(code);
    }

    /**
     * @Author: 李顺时
     * @Description: 通过县代号查找县名称
     * @Date: 16:34 2018/8/12
     */
    @Override
    public String findCountyNameByCode(String code) {
        return countyRepository.getNameByCode(code);
    }
}
